
FIND_PACKAGE(Threads)
ADD_EXECUTABLE(test_thread ../test/test_threadpool.cpp threadpool.cpp threadpool.h)

SET(LIBRARY_OUTPUT_PATH lib)

ADD_LIBRARY(threadpool SHARED threadpool.cpp threadpool.h)

SET_TARGET_PROPERTIES(threadpool PROPERTIES VERSION 1.0 SOVERSION 1)

INSTALL(TARGETS threadpool  LIBRARY DESTINATION lib)
INSTALL(FILES threadpool.h DESTINATION include/CWJ_thread_pool)

TARGET_LINK_LIBRARIES(test_thread ${CMAKE_THREAD_LIBS_INIT})